using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Data.SqlClient;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Webadmin_LeftMenu : System.Web.UI.Page
{
    public DataTable dtGroup = null;
    public DataRow siteOption = null;
    public DataRow adminLang = null; 
    public dbConnection _DB = new dbConnection();
    protected void Page_Load(object sender, EventArgs e)
    {
       
        if (Session["Lang"] == null)
        {
            Session["Lang"] = "";
            Session["GroupUser"] = "";
            Session["AdminUser"] = "";
            Session["AdminLevel"] = "";
            Session["IP"] = "";
            Session["LoginID"] = "";
            Session["LoginTime"] = "";   
            
        }
        if (Session["Page"] == null)
        {
            Session["Page"] = bzStringClass.PreviewPath;
            Response.Redirect("Default.aspx");
        }
        Session["Lang"] = Request.QueryString["Lang"] == null ? Session["Lang"] : Request.QueryString["Lang"];
        Session["Lang"] = bzAdminLang.checkLang(Session["Lang"].ToString());
         this.dtGroup = this.getAdminFunctionGroup();
        this.adminLang = new bzAdminLang(Session["Lang"].ToString(),"LeftMenu").AdminLang;
        this.siteOption = new bzSiteOption("SiteAdmin", "LeftMenu").SiteOption;
    }
   
    public DataTable getAdminFunctionGroup()
    {              
        return _DB.getDataTable("SP_getAdminFunctionGroup");
    }
    public DataTable getAdminFunction(string strGrName,string AdminUser)
    {
        SqlParameter[] p = new SqlParameter[2];
        p[0] = new SqlParameter("@GroupName", strGrName);
        p[1] = new SqlParameter("@AdminUser", AdminUser);
          
        return new dbConnection().getDataTable("SP_getAdminFunction",p);
    }
}
